﻿using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;

namespace Wiz.Minio.EventData;

[DependsOn(
    typeof(AbpAutofacModule)
)]
public class EventDataModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddMinioFileService(context.Services.GetConfiguration());
    }
    // public override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
    // {
    //     var logger = context.ServiceProvider.GetRequiredService<ILogger<EventDataModule>>();
    //     var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
       

    //     var hostEnvironment = context.ServiceProvider.GetRequiredService<IHostEnvironment>();
    //     logger.LogInformation($"EnvironmentName => {hostEnvironment.EnvironmentName}");

    //     return Task.CompletedTask;
    // }
}
